<!doctype html>
<html lang="en" class="fixed">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>学员信息</title>
    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css"
          href="<?php xcho(loadSource('/assets/plugins/bootstrap/css/bootstrap.min.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/layui/css/layui.css')) ?>" media="all">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/animate.css/animate.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/font-awesome/css/font-awesome.css')) ?>">
    <link rel="stylesheet"
          href="<?php xcho(loadSource('/assets/plugins/data-table/media/css/dataTables.bootstrap.min.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/app/css/style.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/app/css/app.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/css/new_main.css')) ?>">
    
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        ul,li,ol,li{
            list-style: none;
        }
        .content-cont{
            /*width: 1200px;*/
            background: #fff;
            margin: 0 auto;
        }
        .content-cont .cont-title{
            padding: 10px 0 5px;
            border-bottom: 1px #ccc solid;
        }
        .content-cont .cont-title h2{
            font-size: 16px;
            padding-left: 20px;
            display: inline-block;
        }
        .content-cont .cont-title h2 button{
            padding: 6px 14px;
            background: rgba(226,175,8,.6);
            border: none;
            box-shadow: 0 0 5px #ccc;
            border-radius: 5px;
            font-size: 10px;
            color: #fff;
            margin-left: 80px;
        }
        .content-cont .cont-title ol{
            padding: 10px 20px;
            display: inline-block;
        }
        .content-cont .cont-title ol li{
            display: inline-block;
            margin: 0 5px;
        }
        .content-cont .cont-title ol li button{
            padding: 4px 10px;
            border: none;
            border-radius: 5px;
            color:#fff;
            font-size: 12px;
            background: #1ab394;
        }
        .content-cont .cont-title ul{
            float: right;
            padding: 10px 20px;
        }
        .content-cont .cont-title ul li{
            display: inline-block;
            margin: 0 5px;
        }
        .content-cont .cont-title ul li button{
            padding: 4px 10px;
            border: none;
            border-radius: 5px;
            color:#fff;
            font-size: 12px;
            background: #1ab394;
        }
        .content-cont .cont-title ul li:nth-of-type(3) button{
            background: rgba(215,82,52,.6);
        }
        .content-cont .cont{
            padding: 20px;
        }
        .content-cont .cont ul.list{
            display: inline-block;
            border: 1px #eee solid;
            float: left;
        }
        .content-cont .cont ul.list li{
            line-height: 30px;
            font-size: 12px;
            padding: 0 16px;
            border-bottom: 1px #eee solid;
            cursor: pointer;
        }
        .content-cont .cont ul.list li.active{
            background: #E7F4FD;
            color:#3F93EC;
        }
        .content-cont .cont .cont-tab{
            display: inline-block;
            margin-left: 20px;
            width: 80%;
        }
        .content-cont .cont .cont-tab>div{
            /*display: none;*/
            width: 100%;
        }
        /*---------------baseMessage------------------*/
        .content-cont .cont .cont-tab>div.baseMessage{
            display: inline-block;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess h3{
            font-size: 18px;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess table{
            width: 100%;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess table tr{
            line-height: 30px;
            font-size: 10px;
            color: #333;
        }
        .content-cont .cont .cont-tab .baseMessage .basemess table tr td{
            width: 33%;
        }

        /*-----------------follow-record--------------------*/
        .content-cont .cont .cont-tab .follow-record .basemess h3{
            font-size: 18px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess table tr td span{
            margin-left: 40px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record{
            padding: 20px;
            border: 1px #ccc solid;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record select{
            width: 60px;
            border: 1px #ccc solid;
            border-radius: 5px;
            height: 24px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record input{
            /*width: 120px;*/
            border: 1px #ccc solid;
            border-radius: 5px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record select:nth-of-type(1){
            width: 160px;
            border: 1px #ccc solid;
            border-radius: 5px;
            height: 24px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record span:nth-of-type(2){
            margin-left: 30px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record div{
            margin-top: 10px;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record div p{
            float: left;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record div textarea{
            resize: none;
            border: 1px #ccc solid;
        }
        .content-cont .cont .cont-tab .follow-record .basemess .basemess-record button{
            padding: 4px 14px;
            border: none;
            border-radius: 5px;
            background: #1ab394;
            color:#fff;
            font-size: 12px;
            margin-left: 64px;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages{
            padding: 3px 15px;
            height: 30px;
            margin-top: 8px;
            font-size: 0;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages p{
            display: inline-block;
            font-size: 12px;
        }
        .content-cont .cont .cont-tab .follow-record .top_pages ul{
            font-size: 0;
            display: inline-block;
            float: right;
        }
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li:nth-of-type(1){*/
            /*width: 120px;*/
            /*border:none;*/
            /*background: none;*/
        /*}*/
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li:nth-of-type(1):hover{*/
            /*background: none;*/
            /*color:#999;*/
        /*}*/
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li{*/
            /*display: inline-block;*/
            /*font-size: 12px;*/
            /*width: 24px;*/
            /*height: 24px;*/
            /*background: #fff;*/
            /*margin-left: 10px;*/
            /*line-height: 24px;*/
            /*text-align: center;*/
            /*border: 1px #ccc solid;*/
            /*border-radius: 6px;*/
            /*cursor: pointer;*/
            /*color:#999;*/
        /*}*/
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li:last-child{*/
            /*width: 120px;*/
            /*border:none;*/
            /*background: none;*/
        /*}*/
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li:last-child input{*/
            /*width: 50px;*/
            /*margin: 0 10px;*/
            /*border-radius: 6px;*/
            /*border: none;*/
            /*border:1px #ccc solid;*/
            /*outline: none;*/
        /*}*/
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li:last-child:hover{*/
            /*background: none;*/
            /*color:#999;*/
        /*}*/
        /*.content-cont .cont .cont-tab .follow-record .top_pages ul li:hover{*/
            /*background: #108EE9;*/
            /*color:#fff;*/
        /*}*/
        .content-cont .cont .cont-tab .follow-record .table{
            width: 100%;
            margin-top: 10px;
        }
        .content-cont .cont .cont-tab .follow-record .table table{
            width: 100%;
        }
        .content-cont .cont .cont-tab .follow-record .table table thead tr th{
            padding: 10px;
            background: #1ab394;
            color:#fff;
            text-align: center;
        }
        .content-cont .cont .cont-tab .follow-record .table table thead tr th:nth-of-type(1) span{
            display: inline-block;
            width: 12px;
            height: 12px;
            border:1px #888 solid;
            background: #fff;
            margin-right: 20px;
            position: relative;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab .follow-record .table table thead tr th:nth-of-type(1) span b{
            position: absolute;
            left: 28%;
            top:-60%;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr{
            border-bottom: 1px #ccc solid;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td{
            padding: 8px;
            border-bottom: 1px #eee solid;
            text-align: center;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td:nth-of-type(2){
            color:#108EE9;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td:last-child span{
            margin: 0 5px;
            color:#777;
            position: relative;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab .follow-record .table table tbody tr td:last-child span b{
            width: 40px;
            line-height: 24px;
            background: #fff;
            position: absolute;
            bottom: -25px;
            left: -15px;
            font-weight: normal;
            font-size: 10px;
            color:#000;
            border: 1px #ccc solid;
            border-radius: 5px;
            display: none;
        }
        .content-cont .cont .cont-tab .follow-record .bottom_pages{
            padding: 3px 15px;
            height: 30px;
            margin-top: 8px;
            background: #fff;
            font-size: 0;
        }
        /*----------------------he-course-----------------*/
        .content-cont .cont .cont-tab>div.he-course{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.he-course ul{
            border-bottom: 1px #eee solid;
        }
        .content-cont .cont .cont-tab>div.he-course ul li{
            display: inline-block;
            width: 80px;
            text-align: center;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab>div.he-course ul li.active{
            border-bottom: 2px #1ab394 solid;
            color:#1ab394;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div{
            display: none;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div:nth-of-type(1){
            display: block;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table thead tr{
            background: #1ab394;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table thead tr th{
            padding: 10px 0;
            color:#fff;
            text-align: center;
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table tbody tr{

        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table tbody tr:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.he-course .heCourse-cont>div table tbody tr td{
            padding: 6px 0;
            text-align: center;
            color:#333;
        }
        /*---------------schedule------------------*/
        .content-cont .cont .cont-tab>div.schedule button{
            padding: 4px 14px;
            border: none;
            border-radius: 5px;
            background: #1ab394;
            color:#fff;
            font-size: 12px;
            margin-left: 10px;
        }
        .content-cont .cont .cont-tab>div.schedule h4{
            display: inline-block;
            margin-left: 200px;
        }
        .content-cont .cont .cont-tab>div.schedule table{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.schedule table thead tr{
            border-bottom: 3px #eee solid;

        }
        .content-cont .cont .cont-tab>div.schedule table thead tr th{
            text-align: center;
            padding: 10px 0;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr{
            border-bottom: 3px #eee solid;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr span{
            color:#333;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr span b{
            padding: 4px 8px;
            font-weight: normal;
            font-size: 12px;
            color: #fff;
            background: #1ab394;
            border-radius: 5px;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr ul{
            margin-top: 6px;
            padding: 4px 10px;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td:nth-of-type(even) ul:nth-of-type(odd){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td:nth-of-type(odd) ul:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td{
            vertical-align: initial;
            padding: 10px 0;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td ul li{
            line-height: 24px;
            font-size: 12px;
        }
        .content-cont .cont .cont-tab>div.schedule table tbody tr td ul li:nth-of-type(3){
            color:#108EE9;
        }
        /*---------------reviseLog------------------*/
        .content-cont .cont .cont-tab>div.reviseLog table{
            width: 100%;
        }
        .content-cont .cont .cont-tab>div.reviseLog table thead tr{
            background: #1ab394;
        }
        .content-cont .cont .cont-tab>div.reviseLog table thead tr th{
            padding: 10px 0;
            color:#fff;
            text-align: center;
        }
        .content-cont .cont .cont-tab>div.reviseLog table tbody tr{

        }
        .content-cont .cont .cont-tab>div.reviseLog table tbody tr:nth-of-type(even){
            background: rgba(238,238,238,.5);
        }
        .content-cont .cont .cont-tab>div.reviseLog table tbody tr td{
            padding: 6px 0;
            text-align: center;
            color:#333;
        }
        /*------------------charge-record----------------*/
        .content-cont .cont .cont-tab .charge-record table tbody tr td:last-child span{
            margin: 0 5px;
            color:#777;
            position: relative;
            cursor: pointer;
        }
        .content-cont .cont .cont-tab .charge-record table tbody tr td:last-child span b{
            width: 40px;
            line-height: 24px;
            background: #fff;
            position: absolute;
            bottom: -25px;
            left: -15px;
            font-weight: normal;
            font-size: 10px;
            color:#000;
            border: 1px #ccc solid;
            border-radius: 5px;
            display: none;
        }
    </style>
</head>

<body><?php include_once TPL_PATH . 'public/nav.phtml'; ?>
<div class="wrap">
    <div class="page-body" style="padding: 0">
        <div class="content" style="margin: 0;background: #F4F4F4">
            <div class="content-cont">
                <div class="cont-title">
                    <h2><?php xcho($sname) ?> <button><a href="<?php xcho(url('/student/formal/index')) ?>">返回列表</a></button></h2>
                    <ol>
                        <?php if(!empty($nextId)) { ?>
                            <!--                            <li><button><a href="--><?php // xcho(url('/student/student/studentinfo')) ?><!--?student_id=--><?php //xcho($nextId) ?><!--">下一条</a></button></li>-->
                            <li><button><a href="<?php xcho(url('/student/formal/studentinfo')) ?>?student_id=<?php xcho($nextId) ?>" >下一条</a></button></li>
                        <?php } ?>
                        <!--                        <li><button><a href="--><?php //xcho(url('/course/Reservation/add')) ?><!--?id=--><?php //xcho($student_id) ?><!--">创建试听</a></button></li>-->
                        <li><button><a href="<?php xcho(url('/course/Reservation/add')) ?>?id=<?php xcho($student_id) ?>" >创建试听</a></button></li>
                        <?php if(!empty($gw_id)){ ?>
                            <li><button><a href="<?php xcho($gw_by_course) ?>?str=<?php xcho($str) ?>&key=<?php xcho($key) ?>" target="_blank">官网购课</a></button></li>
                        <?php } ?>

                        <?php if(!empty($aActions['handCourse'])) { ?>
                            <!--                            <li><button><a href="--><?php //xcho(url('/finance/order/handBuyCourse')) ?><!--?student_id=--><?php //xcho($student_id) ?><!--">手动购课</a></button></li>-->
                            <li><button><a href="<?php xcho(url('/finance/order/handBuyCourse')) ?>?student_id=<?php xcho($student_id) ?>" target="_blank">手动购课</a></button></li>
                        <?php } ?>


                        <!--                        <li><button><a href="--><?php //xcho(url('/student/student/info')) ?><!--?student_id=--><?php //xcho($student_id) ?><!--">添加跟踪记录</a></button></li>-->
                        <li><button><a href="<?php xcho(url('/student/formal/info')) ?>?student_id=<?php xcho($student_id) ?>">添加跟踪记录</a></button></li>
                    </ol>
                    <ul>
                        <?php if(!empty($aActions['edit'])) { ?>
                            <!--                            <li><button><a href="--><?php //xcho(url('/student/student/editstudent')) ?><!--?student_id=--><?php //xcho($student_id) ?><!--">编辑</a></button></li>-->
                            <li><button><a href="<?php xcho(url('/student/formal/editstudent')) ?>?student_id=<?php xcho($student_id) ?>">编辑</a></button></li>
                        <?php } ?>
                        <?php if(!empty($aActions['del'])) { ?>
                        <li><button><a class="delete" data-cn_id="<?php xcho($student_id) ?>">删除</a></button></li>
                        <?php } ?>
                    </ul>
                </div>
                <div class="cont">
                    <ul class="list">
                        <li><a href="<?php xcho($studentinfo) ?>?student_id=<?php xcho($student_id) ?>" >基础信息</a></li>
                        <li><a href="<?php xcho($fol_list) ?>?student_id=<?php xcho($student_id) ?>" >跟踪记录（<?php xcho($count_follow) ?>）</a></li>
                        <li><a href="<?php xcho($courseinfo) ?>?student_id=<?php xcho($student_id) ?>" >TA的课程（<?php xcho($totalCourse) ?>）</a></li>
                        <li><a href="<?php xcho($courselist) ?>?student_id=<?php xcho($student_id) ?>" >课程表</a></li>
                        <li><a href="<?php xcho(url('/student/student/charges')) ?>?student_id=<?php xcho($student_id) ?>" >收费记录</a>（<?php xcho($count_chargeList) ?>）</li>
                        <li><a href="<?php xcho($loglist) ?>?student_id=<?php xcho($student_id) ?>" >修改日志（<?php xcho($editLog) ?>）</a></li>

                    </ul>
                    <div class="cont-tab">
                        <div class="follow-record">
                            <div class="basemess">
                                <h3>跟踪记录</h3>
                                <div class="basemess-record">
                                    <span>意向状态：</span>
                                    <select name="intention" id="">
                                        <option value="">请选择</option>
                                        <?php foreach ($intention as $ti) { ?>
                                          <option value="<?php xcho($ti['dict_value']) ?>"><?php xcho($ti['cn_name']) ?></option>
                                        <?php } ?>
                                    </select>
                                    <span>下次联系时间：</span>
                                    <div class="option-inline layui-inline" style="margin: 0">
                                        <input type="text"  class="layui-input" placeholder="YYYY-MM-DD" name="next_contact_time" id="date">
                                    </div>

                                    <div class="basemess-cont">
                                        <p>联系备注：</p>
                                        <textarea name="remark" id="" cols="100" rows="3"></textarea>
                                    </div>
                                    <button class="submit">确定</button>
                                </div>
                            </div>
                            <div class="table">
                                <table>
                                    <thead>
                                    <tr>
                                        <th>添加时间</th>
                                        <th>添加账号</th>
                                        <th>联系结果</th>
                                        <th>意向状态</th>
                                        <th>下次联系时间</th>
                                        <th>联系备注</th>
                                        <th>通话时长</th>
<!--                                        <th>操作</th>-->
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php foreach ($followList as $vo) { ?>
                                    <tr>
                                        <td><?php xcho($vo['add_time_name']) ?> </td>
                                        <td><?php xcho($vo['create_name']) ?></td>
                                        <td><?php xcho($vo['contact_name']) ?></td>
                                        <td><?php xcho($vo['intention_name']) ?></td>
                                        <td><?php xcho($vo['next_contact_time_name']) ?></td>
                                        <td><?php xcho($vo['remark']) ?></td>
                                        <td><?php xcho($vo['call_duration']) ?></td>
<!--                                        <td><a>编辑</a></td>-->
                                        <?php } ?>

                                    </tr>


                                    </tbody>
                                </table>
                            </div>
                            <?php xchoHtml($followList->render()) ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" name="del" value="<?php xcho($del) ?>"/>
<input type="hidden" name="add_follow"  value="<?php xcho($addFollow) ?>">
<input type="hidden" name="student_id"  value="<?php xcho($student_id) ?>">
<script src="<?php xcho(loadSource('/assets/plugins/jquery/jquery.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/layui/layui.all.js')) ?>" charset="utf-8"></script>
<script src="<?php xcho(loadSource('/assets/plugins/bootstrap/js/bootstrap.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/data-table/media/js/jquery.dataTables.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/data-table/media/js/dataTables.bootstrap.min.js')) ?>"></script>
<script
        src="<?php xcho(loadSource('/assets/plugins/data-table/extensions/Responsive/js/dataTables.responsive.min.js')) ?>"></script>
<script
        src="<?php xcho(loadSource('/assets/plugins/data-table/extensions/Responsive/js/responsive.bootstrap.min.js')) ?>"></script>
<script>
    $(".cont>ul.list>li").click(function(){
        var ind=$(this).index();
        $(this).addClass("active").siblings("li").removeClass("active");
        $(".cont>.cont-tab>div").eq(ind).slideDown(200).siblings("div").slideUp(200);
    })
    $("table tr>td>span").hover(function(){
        $(this).find("b").show();
    },function(){
        $(this).find("b").hide();
    })
    $(".he-course>ul>li").click(function(){
        var ind=$(this).index();
        $(this).addClass("active").siblings("li").removeClass("active");
        $(".heCourse-cont>div").eq(ind).slideDown(200).siblings("div").slideUp(200);
    })
    var layer = layui.layer
        , form = layui.form, laydate = layui.laydate;

    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = year + seperator1 + month + seperator1 + strDate;
        return currentdate;
    }
    var now_date=getNowFormatDate();

    laydate.render({
        elem: '#date'
        ,type: 'datetime'
        ,min: now_date
    });
    $(".submit").on("click", function () {
        var param = {};
        param.student_id = $("[name=student_id]").val();
        param.intention = $("[name=intention]").val();
        param.remark = $("[name=remark]").val();
        param.next_contact_time = $("[name=next_contact_time]").val();
        $.ajax({
            url: $("input[name='add_follow']").val(),
            type: 'post',
            data:param,
            dataType: 'json',
            success: function (data) {
                console.log(data);
                if(data.success == 1){
                    layer.alert("保存成功",function(){
                        location.reload();
                    })
                }else{

                }
            },
            complete:function(){

            },
            error: function () {

            }
        });
    });
    $(function () {
        $(".delete").on("click", function () {
            if (confirm("确定删除本条数据吗？")) {
                var cn_id = $(this).attr("data-cn_id");
                $.ajax({
                    url: $("input[name='del']").val(),
                    data: {
                        ids: cn_id
                    },
                    type: 'post',
                    dataType: 'json',
                    success: function (data) {
                        console.log(data)
                        if (data.success == 1) {
                            layer.alert("删除成功!", {
                                skin: 'layui-layer-molv'
                            }, function () {
                                window.location.href = "/student/formal/index";
                                //window.parent.updateParentTab({href:'/student/formal/index',title:'学员列表'})
                            })
                        } else {
                            layer.alert(data.msg, {
                                skin: 'layui-layer-molv'
                            }, function () {
//                                window.parent.updateParentTab({href:'/student/student/index',title:'学员列表'})
                            })
                        }
                    },
                    complete: function () {
                    },
                    error: function () {

                    }
                });
            }
        })
    })
</script>
<?php include_once TPL_PATH . 'public/foot_script.phtml'; ?>
<button id="top" style="height: 50px;width: 50px;"></button></body>

</html>
